/**
 * Created by Administrator on 2017-11-25
 */
define(function (require, exports, module) {
    'use strict';
    function accounts(userid,id) {
        var payment = $('#payment').val();
        $('#money').html(payment);
        $.ajax({
            url: '/scenicspot/updatereservemes',
            type: 'POST',
            data: {
                userid:userid,
                id:id,
                payment:payment
            },
            success: function (res) {
                if (!res.success) {
                    alert(res.msg);
                    return;
                }else{
                    toast.show("结算成功！");
                    MAIN.mineInfo();

                }
            }
        })
    }

    return {
        accounts:accounts

    }
})